import 'package:distribution_mall_flutter/generated/json/base/json_convert_content.dart';
import 'package:distribution_mall_flutter/pages/agreement/presentation/domain/privacy_entity.dart';

PrivacyBody $PrivacyBodyFromJson(Map<String, dynamic> json) {
  final PrivacyBody privacyBody = PrivacyBody();
  final String? block = jsonConvert.convert<String>(json['block']);
  if (block != null) {
    privacyBody.block = block;
  }
  final String? content = jsonConvert.convert<String>(json['content']);
  if (content != null) {
    privacyBody.content = content;
  }
  return privacyBody;
}

Map<String, dynamic> $PrivacyBodyToJson(PrivacyBody entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['block'] = entity.block;
  data['content'] = entity.content;
  return data;
}

extension PrivacyBodyExtension on PrivacyBody {
  PrivacyBody copyWith({
    String? block,
    String? content,
  }) {
    return PrivacyBody()
      ..block = block ?? this.block
      ..content = content ?? this.content;
  }
}